/*LICENSE_BEGIN
 * ******************************************************************
 * Copyright 2006 by the Dainamite Robocup-Team at the
 * DAI-Labor, TU-Berlin (www.dai-labor.de)
 * 
 * Members of Dainamite are:
 * Holger Endert
 * Robert Wetzker
 * Thomas Karbe
 * Axel Heßler
 * Philippe Bütter
 * Felix Brossmann
 * 
 * Licensed under the GNU GPL (General Public License) Free Software 
 * License, Version 2. You may use this file only in compliance with 
 * the License. You may obtain a copy of the License at:
 * 
 * http://www.fsf.org/licensing/licenses/gpl.txt
 * ******************************************************************
LICENSE_END*/
package robocup.component.speechacts.coachlanguage;

public class ActionElement {

	private TypeConstants.ACTIONTYPE actionType = TypeConstants.ACTIONTYPE.INIT;

	private String actionName = "";

	private Region posRegion = null;

	private Region homeRegion = null;

	private UnumSet markUnumSet = null;

	private UnumSet marklUnumSet = null;

	private Region marklRegion = null;

	private Region olineRegion = null;

	private int htypeInt = 0;

	private Region passRegion = null;

	private UnumSet passUnumSet = null;

	private Region dribbleRegion = null;

	private Region clearRegion = null;

	private UnumSet tackelUnumSet = null;

	private Bto bto = null;

	public Bto getBto() {
		return bto;
	}

	public void setBto(Bto bto) {
		this.bto = bto;
	}

	public TypeConstants.ACTIONTYPE getActionType() {
		return actionType;
	}

	public void setActionType(TypeConstants.ACTIONTYPE actionType) {
		this.actionType = actionType;
	}

	public String getActionName() {
		return actionName;
	}

	public void setActionName(String actionName) {
		this.actionName = actionName;
	}

	public Region getClearRegion() {
		return clearRegion;
	}

	public void setClearRegion(Region clearRegion) {
		this.clearRegion = clearRegion;
	}

	public Region getDribbleRegion() {
		return dribbleRegion;
	}

	public void setDribbleRegion(Region dribbleRegion) {
		this.dribbleRegion = dribbleRegion;
	}

	public Region getHomeRegion() {
		return homeRegion;
	}

	public void setHomeRegion(Region homeRegion) {
		this.homeRegion = homeRegion;
	}

	public int getHtypeInt() {
		return htypeInt;
	}

	public void setHtypeInt(int htypeInt) {
		this.htypeInt = htypeInt;
	}

	public Region getMarklRegion() {
		return marklRegion;
	}

	public void setMarklRegion(Region marklRegion) {
		this.marklRegion = marklRegion;
	}

	public UnumSet getMarklUnumSet() {
		return marklUnumSet;
	}

	public void setMarklUnumSet(UnumSet marklUnumSet) {
		this.marklUnumSet = marklUnumSet;
	}

	public UnumSet getMarkUnumSet() {
		return markUnumSet;
	}

	public void setMarkUnumSet(UnumSet markUnumSet) {
		this.markUnumSet = markUnumSet;
	}

	public Region getOlineRegion() {
		return olineRegion;
	}

	public void setOlineRegion(Region olineRegion) {
		this.olineRegion = olineRegion;
	}

	public Region getPassRegion() {
		return passRegion;
	}

	public void setPassRegion(Region passRegion) {
		this.passRegion = passRegion;
	}

	public UnumSet getPassUnumSet() {
		return passUnumSet;
	}

	public void setPassUnumSet(UnumSet passUnumSet) {
		this.passUnumSet = passUnumSet;
	}

	public UnumSet getTackelUnumSet() {
		return tackelUnumSet;
	}

	public void setTackelUnumSet(UnumSet tackelUnumSet) {
		this.tackelUnumSet = tackelUnumSet;
	}

	public Region getPosRegion() {
		return posRegion;
	}

	public void setPosRegion(Region posRegion) {
		this.posRegion = posRegion;
	}

	public String toString() {
		StringBuffer buf = new StringBuffer();

		switch (this.actionType) {

		case INIT:
			buf.append("(empty action)");
			break;

		case POS:
			buf.append("(pos " + this.posRegion.toString() + ")");
			break;

		case HOME:
			buf.append("(home " + this.homeRegion.toString() + ")");
			break;

		case MARK:
			buf.append("(mark " + this.markUnumSet.toString() + ")");
			break;

		case MARKL_UNUM:
			buf.append("(markl " + this.marklUnumSet.toString() + ")");
			break;

		case MARKL_REGION:
			buf.append("(markl " + this.marklRegion.toString() + ")");
			break;

		case OLINE:
			buf.append("(oline " + this.olineRegion.toString() + ")");
			break;

		case HTYPE:
			buf.append("(htype " + this.htypeInt + ")");
			break;

		case PASS_REGION:
			buf.append("(pass " + this.passRegion.toString() + ")");
			break;

		case PASS_UNUM:
			buf.append("(pass " + this.passUnumSet.toString() + ")");
			break;

		case DRIBBLE:
			buf.append("(dribble " + this.dribbleRegion.toString() + ")");
			break;

		case CLEAR:
			buf.append("(clear " + this.clearRegion.toString() + ")");
			break;

		case TACKLE:
			buf.append("(tackle " + this.tackelUnumSet.toString() + ")");
			break;

		case BTO:
			buf.append("(bto " + this.bto.toString() + ")");
			break;

		case APPROACH_BALL:
			buf.append("(approach_ball)");
			break;

		case SHOOT:
			buf.append("(shoot)");
			break;

		case HOLD:
			buf.append("(hold)");
			break;

		case INTERCEPT:
			buf.append("(intercept)");
			break;

		case NAME:
			buf.append(this.actionName);
			break;
		}

		return buf.toString();
	}

}
